package miiteen.customsportal.basic.beans;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import miiteen.common.json.jackson.LongSerialize;
import miiteen.common.utils.FieldMeta;
import miiteen.sys.base.bean.BasePo;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@ApiModel("网站访问记录")
public class BasicPageBrowsing  extends BasePo {

    @FieldMeta(name = "id")
    @ApiModelProperty(value = "id")
    private long id;

    @FieldMeta(name = "工号")
    @ApiModelProperty(value = "工号")
    private String jobNo;

    @FieldMeta(name = "姓名")
    @ApiModelProperty(value = "姓名")
    private String userName;

    @FieldMeta(name = "IP地址")
    @ApiModelProperty(value = "IP地址")
    private String ipAddress;

    @FieldMeta(name = "浏览时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "浏览时间")
    private Date browsingDate;

    @FieldMeta(name = "删除状态")
    @ApiModelProperty(value = "删除状态")
    private int delState;

    @FieldMeta(name = "总")
    @ApiModelProperty(value = "总访问量")
    private int totalCount;

    @FieldMeta(name = "今日访问量")
    @ApiModelProperty(value = "今日访问量")
    private int todayCount;


    @JsonSerialize(using = LongSerialize.class)
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getJobNo() {
        return jobNo;
    }

    public void setJobNo(String jobNo) {
        this.jobNo = jobNo;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getBrowsingDate() {
        return browsingDate;
    }

    public void setBrowsingDate(Date browsingDate) {
        this.browsingDate = browsingDate;
    }

    public int getDelstate() {
        return delState;
    }

    public void setDelstate(int delstate) {
        this.delState = delState;
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public int getTodayCount() {
        return todayCount;
    }

    public void setTodayCount(int todayCount) {
        this.todayCount = todayCount;
    }
}
